check if x handle is available. There are any references about check if x handle is available in here. you can look below.